﻿<UserControl x:Class="IntegrationTool.SDK.GenericControls.LoadingControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="60" Width="60">
    <UserControl.Resources>
        <SolidColorBrush x:Key="SpinnerColorBrush" Color="LightBlue" />
        
    </UserControl.Resources>
    <Grid Name="LayoutRoot" RenderTransformOrigin="0.5,0.5">
        <Grid.Triggers>
            <EventTrigger RoutedEvent="Grid.Loaded">
                <BeginStoryboard>
                    <Storyboard >
                        <DoubleAnimation Storyboard.TargetName="rotateTransform"
                       Storyboard.TargetProperty="Angle"
                       From="0" To="720" Duration="00:00:01"
                       RepeatBehavior="Forever"/>
                    </Storyboard>
                </BeginStoryboard>
            </EventTrigger>
        </Grid.Triggers>
        <Grid.RenderTransform>
            <TransformGroup>
                <RotateTransform x:Name="rotateTransform"/>
            </TransformGroup>
        </Grid.RenderTransform>
        <Ellipse Fill="{DynamicResource SpinnerColorBrush}">
            <Ellipse.OpacityMask>
                <ImageBrush ImageSource="spinnermask.png" Stretch="None"/>
            </Ellipse.OpacityMask>
        </Ellipse>
        <Grid.OpacityMask>
            <RadialGradientBrush>
                <GradientStop Color="Black" Offset="0.96"/>
                <GradientStop Color="Transparent" Offset="0.959"/>
            </RadialGradientBrush>
        </Grid.OpacityMask>
        
    </Grid>

</UserControl>
